package cn.wjssl.domain.strategy.service.armory;

import java.util.Date;

/**
 * 策略抽奖调度接口
 */
public interface IStrategyDispatch {

    /**
     * 抽奖,生成随机的awardID
     * @param strategyId
     * @return
     */
    public Integer getRandomAwardId(Long strategyId);

    /**
     * 抽奖, 有权重的奖池, 生成随机的 awardId
     * @param strategyId
     * @param ruleWeightRuleValue
     * @return
     */
    public Integer getRandomAwardId(Long strategyId, String ruleWeightRuleValue);

    /**
     * 扣减商品库存
     * @param strategyId
     * @param awardId
     * @return 是否还有库存
     */
    Boolean subtractionAwardStock(Long strategyId, Integer awardId, Date endDateTime);
}
